const app = getApp();

Component({
	data: {
		selected: 'index',
		color: "#bfbfbf",
		selectedColor: "#3F7CFB",
		is_customer: false,
		list: [{
			pagePath: "/pages/index/index",
			iconPath: "/static/tabbar/index.png",
			selectedIconPath: "/static/tabbar/index-actived.png",
			text: "首页",
			key: 'index',
		}, {
			pagePath: "/pages/customer/customer",
			iconPath: "/static/tabbar/customer.png",
			selectedIconPath: "/static/tabbar/customer-actived.png",
			text: "客户",
			key: 'customer',
		}, {
			pagePath: "/pages/mine/mine",
			iconPath: "/static/tabbar/mine.png",
			selectedIconPath: "/static/tabbar/mine-actived.png",
			text: "我的",
			key: 'mine',
		}]
	},
	methods: {
		switchTab(e) {
			const data = e.currentTarget.dataset
			const url = data.path
			wx.switchTab({
				url
			})
		},
	}
})